package com.hlf.modules.wechat.service.impl;

import com.hlf.modules.wechat.mapper.ConfigWechatTemplateMapper;
import com.hlf.modules.wechat.model.ConfigWechatTemplate;
import com.hlf.modules.wechat.service.ConfigWechatTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ConfigWechatTemplateService实现
 * @since 0.0.1
 * @author pan
 * @date 2017-07-10
 *
 */
@Service
public class ConfigWechatTemplateServiceImpl implements ConfigWechatTemplateService {

    @Autowired
    private ConfigWechatTemplateMapper mapper;

    @Override
    public int deleteById(Long id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(ConfigWechatTemplate record) {
        return mapper.insertSelective(record);
    }

    @Override
    public ConfigWechatTemplate selectById(Long id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public List<ConfigWechatTemplate> selectByAgentId(Long topAgentId) {
        return mapper.selectByAgentId(topAgentId);
    }

    @Override
    public int updateById(ConfigWechatTemplate record) {
        return mapper.updateByPrimaryKeySelective(record);
    }

}